<template>
  <div>
    <component :is="component" v-if="component" :fakeTaskParams="fakeTaskParams" @closeFake="closeFake"/>
  </div>
</template>

<script>

  export default {
    props: {
      link: String,
      fakeTaskParams: Object
    },
    data() {
      return {
        // 组件
        component: null
      }
    },
    mounted() {
      this.component = (resolve) => require(['@/views/' + this.link], resolve);
    },
    methods: {
      closeFake() {
        this.$emit("closeFake")
      }
    }
  }
</script>